<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<div class="pageContent">
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>登录名：</label>
				<input name="user.username"  type="text" readonly="readonly" size="30" value="${user.username}" />
			</p>
			<p>
				<label>姓名：</label>
				<input name="user.name"  readonly="readonly" type="text" size="30" value="${user.name}" />
			</p>
			<p>
				<label>状态：</label>
				<select name="user.enabled" class="combox"  readonly="readonly">
				<c:if test="${user.enabled==true}"><option value="true">正常</option></c:if>
				<c:if test="${user.enabled==false}"><option value="false">锁定</option></c:if>
				</select>
			</p>
			
			<div class="divider"></div>

				<div>
					<table class="list nowrap" width="50%">
						<thead>
							<tr>
								<th size="12">部门名称</th>
								<th size="12">职位名称</th>
							</tr>
						</thead>
						<tbody>
						<c:forEach items="${user.department_position}" var="d_p" varStatus="status">
							<tr class="unitBox">
								<td>
									<input type="text"  readonly="readonly" class="textInput valid" size="12" value="${d_p.department.name}"  name="deplist[${status.index}].name" />
									
								</td>
								<td>
									<input type="text"  readonly="readonly" class="textInput valid" size="12" value="${d_p.position.name}"  name="poslist[${status.index}].name"  />
									
								</td>
							</tr>
						</c:forEach>
						</tbody>
					</table>
				</div>
				
			<div class="divider"></div>


			<p style="width: 800px;">
				<label>用户组：</label>
				<c:forEach items="${groups}" var="group">
				<c:choose>
				<c:when test="${userGroup[group.code]==group.name}">
				<input type="checkbox" name="group"  readonly="readonly" checked="checked" value="${group.id}" />${group.name}
				</c:when>
				<c:otherwise>
				<input type="checkbox" name="group"  readonly="readonly" value="${group.id}" />${group.name}
				</c:otherwise>
				</c:choose>
				</c:forEach>
			</p>
	
			<p style="width: 800px;">
				<label>角色：</label>
				<c:forEach items="${roles}" var="role">
				<c:choose>
				<c:when test="${userRole[role.code]==role.name}">
				<input type="checkbox" name="role"  readonly="readonly" checked="checked"  value="${role.id}" />${role.name}
				</c:when>
				<c:otherwise>
				<input type="checkbox" name="role"  readonly="readonly" value="${role.id}" />${role.name}
				</c:otherwise>
				</c:choose>
				
				</c:forEach>
			</p>
	

		</div>
</div>